package com.deng.util
{
	import mx.controls.Alert;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	import mx.rpc.remoting.mxml.RemoteObject;
	
	public class GlobalProperties
	{
		public static var _SERVER_URL:String = "";
		
		public static const _LOGIN_MAINTENANCE:String = "_LOGIN_MAINTENANCE";
		public static const _LOGIN_APP:String = "_LOGIN_APP";
		public static const _LOGIN:String = "_LOGIN";
		public static const _LOGIN_CHANGE_PW:String = "_LOGIN_CHANGE_PW";
		public static const _LOG_CHECK_TN:String = "_LOG_CHECK_TN";
		
		public static const _FIRST_NOT_VALID_SECOND_NOT_VALID:String = "_FIRST_NOT_VALID_SECOND_NOT_VALID";
		public static const _FIRST_VALID_SECOND_NOT_VALID:String = "_FIRST_VALID_SECOND_NOT_VALID";
		public static const _FIRST_VALID_SECOND_VALID:String = "_FIRST_VALID_SECOND_VALID";
			
		
		
		public static const _IS_EFFECTIVE:String = "_IS_EFFECTIVE";
		public static const _NOT_EFFECTIVE:String = "_NOT_EFFECTIVE";
		
		public static const _IS_DEF_PERFORMANCE:int = 1;
		public static const _NOT_DEF_PERFORMANCE:int = 0;
		
		public static const _DRUG_TYPE:int = 1;
		public static const _ITEM_TYPE:int = 2;
		
		public static const _VH_ORGANIZATION_VS_KPI:String = "_VH_ORGANIZATION_VS_KPI";
		public static const _VH_ORGANIZATION_VS_CB:String = "_VH_ORGANIZATION_VS_CB";
		
		
		
		public static const _MANAGER_ROLE:String = "_MANAGER_ROLE";
		public static const _MANAGE_ITEM_WEIGHT:String = "_MANAGE_ITEM_WEIGHT";
		public static const _MANAGE_ORGANIZATION_ITEM_WEIGHT:String = "_MANAGE_ORGANIZATION_ITEM_WEIGHT";
		public static const _MANAGE_NAVIGATION:String = "_MANAGE_NAVIGATION";
		public static const _MANAGE_NAVIGATION2:String = "_MANAGE_NAVIGATION2";
		public static const _MANAGE_NAVIGATION_OPERATE:String = "_MANAGE_NAVIGATION_OPERATE";
		public static const _MANAGE_FUNCTION:String = "_MANAGE_FUNCTION";
		public static const _MANAGE_KPI_INDICATE:String = "_MANAGE_KPI_INDICATE";
		public static const _MANAGE_KPI_VALUE:String = "_MANAGE_KPI_VALUE";
		public static const _MANAGE_KPI_VALUE_VALID:String = "_MANAGE_KPI_VALUE_VALID";
		public static const _MANAGE_KPI_AUDI:String = "_MANAGE_KPI_AUDI";
		public static const _MANAGE_KPI_SETTING:String = "_MANAGE_KPI_SETTING";
		public static const _MANAGE_KPI_DICT_SETTING:String = "_MANAGE_KPI_DICT_SETTING";
		public static const _MANAGE_ORGANIZATION_CONFIG:String = "_MANAGE_ORGANIZATION_CONFIG";
		public static const _MANAGE_FUNCTION_CONFIG:String = "_MANAGE_FUNCTION_CONFIG";
		public static const _MANAGE_DISPENSE_ORGANIZATION_CONFIG:String = "_MANAGE_DISPENSE_ORGANIZATION_CONFIG";
		public static const _MANAGE_ADMIN_DEPARTMENT_CONFIG:String = "_MANAGE_ADMIN_DEPARTMENT_CONFIG";
		public static const _MANAGE_OPERATE_DEPARTMENT_CONFIG:String = "_MANAGE_OPERATE_DEPARTMENT_CONFIG";
		public static const _MANAGE_EMPLOYEE_INPUT:String = "_MANAGE_EMPLOYEE_INPUT";
		
		public static const _ETL_MANAGER:String = "_ETL_MANAGER";
		public static const _UPLOAD_EXCEL:String = "_UPLOAD_EXCEL";
		public static const _FANKUIBIAO:String = "_FANKUIBIAO";
		
		public static const _NAV_SELECT_PERFORMANCE_WEIGHT:String = "_NAV_SELECT_PERFORMANCE_WEIGHT";
		public static const _NAV_SELECT_BASE_BONUS:String = "_NAV_SELECT_BASE_BONUS";
		public static const _NAV_SELECT_UNIT_PRICE_ITEM_WEIGHT:String = "_NAV_SELECT_UNIT_PRICE_ITEM_WEIGHT";
		public static const _NAV_SELECT_KPI_INDICATE_WEIGHT:String = "_NAV_SELECT_KPI_INDICATE_WEIGHT";
		public static const _NAV_SELECT_BASE_BONUSE_DETAIL:String = "_NAV_SELECT_BASE_BONUSE_DETAIL";
		
		
		public static const _APP_FIRST_PERFORMANCE:String = "_APP_FIRST_PERFORMANCE";
		public static const _APP_ADMIN_PERFORMANCE:String = "_APP_ADMIN_PERFORMANCE";
		public static const _APP_FIRST_PERFORMANCE_OPERATE:String = "_APP_FIRST_PERFORMANCE_OPERATE";
		public static const _APP_SECOND_PERFORMANCE_OPERATE:String = "_APP_SECOND_PERFORMANCE_OPERATE";
		public static const _APP_SECOND_PERFORMANCE:String = "_APP_SECOND_PERFORMANCE";
		public static const _APP_FIRST_SEARCH:String = "_APP_FIRST_SEARCH";
		public static const _APP_SECOND_SEARCH:String = "_APP_SECOND_SEARCH";
		
		public static const _MANAGE_VOTE_DICT:String = "_MANAGE_VOTE_DICT";		
		public static const _MANAGE_VOTE_VALUE:String = "_MANAGE_VOTE_VALUE";
		public static const _MANAGE_VOTE_VALID:String = "_MANAGE_VOTE_VALID";
		public static const _MANAGE_VOTE_VS_ORGANIZATION:String = "_MANAGE_VOTE_VS_ORGANIZATION";
		
		public static const _MANAGE_OPERATE_VOTE_VALUE:String = "_MANAGE_OPERATE_VOTE_VALUE";
		public static const _MANAGE_OPERATE_VOTE_VALID:String = "_MANAGE_OPERATE_VOTE_VALID";
		public static const _MANAGE_OPERATE_VOTE_DICT:String = "_MANAGE_OPERATE_VOTE_DICT";
		public static const _MANAGE_VOTE_VS_OPERATE:String = "_MANAGE_VOTE_VS_OPERATE";
		public static const _MANAGE_JIANGCHENG_VALUE:String = "_MANAGE_JIANGCHENG_VALUE";
		public static const _MANAGE_LINGDAO_VALUE:String = "_MANAGE_LINGDAO_VALUE";
		
		public static const _MANAGE_ADMIN_VOTE_VALUE:String = "_MANAGE_ADMIN_VOTE_VALUE";
		public static const _MANAGE_ADMIN_VOTE_VALID:String = "_MANAGE_ADMIN_VOTE_VALID";
		public static const _MANAGE_ADMIN_VOTE_DICT:String = "_MANAGE_ADMIN_VOTE_DICT";
		public static const _MANAGE_VOTE_VS_ADMIN:String = "_MANAGE_VOTE_VS_ADMIN";
		
		public static const _MANAGE_ITEM_POINT:String = "_MANAGE_ITEM_POINT";
		public static const _MANAGE_JIANGCHENG_DICT:String = "_MANAGE_JIANGCHENG_DICT";
		public static const _MANAGE_VOTE_DICT2:String = "_MANAGE_VOTE_DICT2";
		public static const _MANAGE_VOTE_VALUE2:String = "_MANAGE_VOTE_VALUE2";
		public static const _MANAGE_VOTE_VALUE2_VALID:String = "_MANAGE_VOTE_VALUE2_VALID";
		public static const _MANAGE_VOTE_VS_ORGANIZATION2:String = "_MANAGE_VOTE_VS_ORGANIZATION2";
		
		public static const _MANAGER_CLASS_STAT_INPUT:String = "_MANAGER_CLASS_STAT_INPUT";
		public static const _MANAGER_CLASS_STAT_INPUT_VALID:String = "_MANAGER_CLASS_STAT_INPUT_VALID";
		
		public static const _REPORT_ITEM_COUNT_DETAIL:String = "_REPORT_ITEM_COUNT_DETAIL";
		public static const _REPORT_RBRVS_COUNT_DETAIL:String = "_REPORT_RBRVS_COUNT_DETAIL";
		public static const _REPORT_MENU:String = "_REPORT_MENU";
		public static const _REPORT_MENU_ORGANIZATION:String = "_REPORT_MENU_ORGANIZATION";
		
		public static const _MANAGE_DATA_IMPORT:String = "_MANAGE_DATA_IMPORT";
		public static const _IS_LEAF:int = 1;
		public static const _IS_NOT_LEAF:int = 0;
		
		public static const _UNIT_PRICE_TYPE:int = 1;
		public static const _KPI_TYPE:int = 2;
		public static const _WORK_LOAD_TYPE:int = 3;
		
		
		public static const _ORGANIZATION_ITME_IS_EFFECTIVE:int = 1;
		public static const _ORGANIZATION_ITME_NOT_EFFECTIVE:int = 0;
		
		public static const _DATA_EDIT_SUCCEED:int = 1;
		public static const _DATA_EDIT_FAIL:int = 0;
		
		public static const _ETL_WORKLOAD_VALID:String = "_ETL_WORKLOAD_VALID";
		
		
		
		public static const GET_DispenseBonusFormula:String = "GET_DispenseBonusFormula";
		public function GlobalProperties()
		{
			initURL();			
		}
		
		private function initURL():void{
			var ro:RemoteObject = new RemoteObject();
			ro.destination = "MsgReader";
			ro.addEventListener(ResultEvent.RESULT,urlRst);
			ro.addEventListener(FaultEvent.FAULT,flt);
			ro.getPt("URL");
		}
		
		private function urlRst(rst:ResultEvent):void{
			GlobalProperties._SERVER_URL = rst.result as String;
		}
		private function flt(evt:FaultEvent):void{
			Alert.show(evt.fault.getStackTrace());
		}
	}
}